#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QStatusBar>
#include <QLabel>
#include <QProgressBar>
#include <QPushButton>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    QMenuBar *menuBar = this->menuBar();
    QStatusBar *statusBar = this->statusBar();
    this->setMenuBar(menuBar);
    this->setStatusBar(statusBar);

//    statusBar->showMessage("曹飞你这个小登",3000);

    QLabel *label1 = new QLabel("直接起飞");
    statusBar->addWidget(label1);
    QLabel *label2 = new QLabel("直接起飞");
    statusBar->addWidget(label2);

    QProgressBar *progressBar = new QProgressBar();
    progressBar->setRange(0,100);
    progressBar->setValue(66);
    statusBar->addWidget(progressBar);

    QPushButton *button = new QPushButton("这不是按钮");
    statusBar->addPermanentWidget(button);

}

MainWindow::~MainWindow()
{
    delete ui;
}

